package xyz.twj

import io.vertx.core.Vertx
import javafx.stage.Stage
import javafx.stage.StageStyle
import xyz.twj.fx.WebViewScene

@Deprecated(message = "no use")
class Application() : javafx.application.Application() {

    companion object{
        val vertex = Vertx.vertx()
    }

    override fun start(primaryStage: Stage?) {

        val webViewScene = WebViewScene("http://localhost:8080/")
        webViewScene.webView.prefHeight = 600.0
        webViewScene.webView.prefWidth = 1200.0

        primaryStage!!.title = "sdds"
        primaryStage.initStyle(StageStyle.UNDECORATED)  //无边框
        primaryStage.scene = webViewScene
        primaryStage.show()
    }
}

fun main(args: Array<String>) {

    //当Java方法为可变参数时，用*args
    javafx.application.Application.launch(Application::class.java, *args)
}